package com.nlp.server.mapper;

import com.nlp.server.pojo.entity.ChatBaseMessage;
import com.nlp.server.pojo.entity.ChatMessage;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 会话记录数据层
 * @author shiliuyinzhen
 */
@Mapper
public interface ChatMessageMapper {

    /**
     * 条件查询用户消息记录
     * @param chatMessage
     * @return
     */
    List<ChatMessage> selectByCondition(ChatMessage chatMessage);

    /**
     * 插入会话消息
     * @param chatMessage
     * @return
     */
    int insertChatMessage(ChatMessage chatMessage);

    /**
     * 查询基本回话消息
     * @param chatMessage
     * @return
     */
    List<ChatBaseMessage> selectChatBaseMessage(ChatMessage chatMessage);
}
